/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package stendcontrol;


import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.util.ArrayList;


/**
 *
 * 
 */
public class ExperimentInputStream extends ObjectInputStream {
    
   
    
    public ExperimentInputStream(InputStream eis) throws IOException{
        super(eis);
    }
        
    /**
     * Возвращает объект типа Experiment из сериализованного файла. 
     * @return Experiment
     * @throws IOException
     * @throws ClassNotFoundException 
     */
    public Experiment readExp() throws IOException, ClassNotFoundException {
        Experiment exp;
        this.readObject();
        this.readInt();
        exp = (Experiment) this.readObject();       
       // exp.setMessages((ArrayList) this.readObject());
         
        return exp;
        
    }

   
    
}
